<div class="crumb-wrap">
    <div class="crumb-list"> <i class="icon-font"></i>
        <a href="<?=site_url()?>">首页</a>
        <span class="crumb-step">&gt;</span>
        <span class="crumb-name"><?=$res['title']?></span>
    </div>
</div>
<div class="search-wrap">
    <div class="search-content" style="margin-left: 20px">
        <a href="<?=site_url('project/show?pid='.$res['project_id'])?>" class="btn btn6 mr10">项目详情</a>
        <!-- 项目属性 -->
        <?php foreach($list as $k => $v):?>
        <a href="<?=site_url('parameters/show?pid='.$v['id'])?>" class="btn <?=$v['id'] == $res['id'] ? 'btn-primary' : ''?> btn6 mr10"><?=$v['title']?></a>
        <?php endforeach; ?>
        <!-- <a href="<?=site_url('fill/index?pid='.$res['id'])?>" class="btn btn6 mr10">客户填写</a> -->
    </div>
</div>

<div class="result-wrap">
    <div class="result-content">
        <form action="<?=site_url('project/create')?>" method="post" id="myform" name="myform" enctype="multipart/form-data">
            <table class="insert-tab" width="100%">
                <tbody>
                    <tr>
                        <th width="120">
                            <i class="require-red">*</i>
                            项目名称：
                        </th>
                        <td><?=$res['title']?></td>
                    </tr>
                    <tr>
                        <th><i class="require-red">*</i>购买积分：</th>
                        <td><span style="font-size:18px;color:red"><?=$res['price']?></span> </td>
                    </tr>
                    <?php if($_SESSION['group'] == 3):?>
                    <tr>
                        <th></th>
                        <td>
                            <input type="hidden" name="article_id" value="">
                            <a class="btn btn-primary btn6 mr10" href="javascript:;" onclick="create_order()">购买</a>
                            <input class="btn btn6" onclick="history.go(-1)" value="返回" type="button"></td>
                    </tr>
                    <?php endif;?>
                </tbody>
            </table>
                <?php if($_SESSION['group'] != 3):?>
                <table class="insert-tab" width="100%" style="margin-top: 10px">
                <tbody>
                    <?php foreach($groups_list as $k => $v):?>
                    <tr>
                        <th width="120"><?=$v['title']?></th>
                        <?php if(empty($prices_list[$v['id']])):?>
                            <td title="没有设置价格"><i class="require-red">*</i> <?=$res['price']?> 元</td>
                        <?php else:?>
                            <td><span style="font-size:16px"><?=$prices_list[$v['id']]?></span> 元</td>
                        <?php endif;?>
                    </tr>
                    <?php endforeach;?>
                </tbody>
                <?php endif;?>
            </table>
        </form>
    </div>
</div>
<div id="wrap">
    <div class="result-wrap" style="width:800px;border-collapse:collapse;border:1px solid #888;margin: 20px">
    <h1 style="font-size:30px"><?=$res['title']?>详情介绍</h1>
    <hr />
    <?=$article['content']?>
    </div>
</div>
<script type="text/javascript">
    function create_order(){
        layer.confirm('购买“<?=$res['title']?>”，费用“<?=$res['price']?>”元，是否确定？', {
            btn: ['确定','取消'] //按钮
        }, function(){
            $.post("<?=site_url('order/create')?>",{pid:<?=$res['id']?>},function(data){

                if(data > 0){
                    location.href="<?=site_url('order/update')?>?oid="+data;
                }else{
                    layer.alert(data,{
                        icon:2,
                    });
                }
            });
        });
    }
</script>